Skip to content

Improve command palette navigation #3174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 25, 2025

Conversation

Adinorio
Copy link
Collaborator

@Adinorio Adinorio commented Jun 24, 2025

Summary by CodeRabbit

  • New Features

    • Introduced collapsible sections for "Quick Actions" and "Coming Soon" features, allowing users to expand or collapse these lists for a cleaner interface.
    • Added robust error handling and user-friendly error messages throughout the command palette, including retry and recovery options.
    • Enhanced empty state and validation feedback with clearer guidance and actionable buttons (e.g., "Create Board" when no boards exist).
  • Improvements

    • Improved user feedback and UI behavior in task and board selection forms, including detailed error and empty state messages.
    • Streamlined navigation and quick action handling, now based on workspace context.
    • Added keyboard shortcuts to toggle key sections within the command palette.
    • Updated board navigation to fetch and display boards asynchronously with collapsible UI and comprehensive loading, error, and empty states.
    • Optimized priority label handling in task list views to improve rendering efficiency.
  • Bug Fixes

    • Fixed issues related to error and loading states for board and task fetching, ensuring users receive accurate feedback and options to recover.

Copy link

graphite-app bot commented Jun 24, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Copy link
Contributor

coderabbitai bot commented Jun 24, 2025

Walkthrough

This update refactors the command palette and its related components to decentralize data fetching, enhance error handling, and improve user feedback. Components like QuickActions, BoardNavigation, and AddTaskForm now manage their own data and UI states, feature collapsible sections, and provide explicit error and empty-state handling. A new error boundary encapsulates the command palette for robust runtime error recovery.

Changes

File(s) Change Summary
apps/web/src/components/command/add-task-form.tsx Improved error handling, retry logic, and user feedback in AddTaskForm; enhanced UI for empty/error states and validation messages.
apps/web/src/components/command/board-navigation.tsx Refactored to fetch boards internally, handle loading/error/empty states, and update UI/props for navigation and board selection.
apps/web/src/components/command/coming-soon.tsx Refactored to a collapsible section with toggle button for upcoming features; preserves disabled feature items in expanded state.
apps/web/src/components/command/command-header.tsx Minor: Changed input handler to use an inline arrow function; no logic change.
apps/web/src/components/command/command-root.tsx Refactored props to accept wsId and setOpen; added keyboard shortcuts and empty state handling; streamlined section rendering.
apps/web/src/components/command/index.tsx Removed centralized data fetching/navigation; added CommandPaletteErrorBoundary for error handling and recovery UI.
apps/web/src/components/command/quick-actions.tsx Refactored to use wsId/setOpen, internal navigation handlers, and collapsible UI for quick actions.
apps/db/supabase/migrations/20250623130150_improve_board_tags_performance_and_atomicity.sql Modified exception handling in validate_board_tags function to catch default RAISE EXCEPTION errors instead of SQLSTATE '22000'.
apps/web/src/app/[locale]/(dashboard)/[wsId]/tasks/boards/[boardId]/_components/list-view.tsx Moved priorityLabels object outside component to avoid recreating it on every render.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant CommandPalette
    participant ErrorBoundary
    participant QuickActions
    participant BoardNavigation
    participant AddTaskForm

    User->>CommandPalette: Open command palette
    CommandPalette->>ErrorBoundary: Render children
    ErrorBoundary->>QuickActions: Render (fetches nothing, uses wsId)
    ErrorBoundary->>BoardNavigation: Render (fetches boards with wsId)
    ErrorBoundary->>AddTaskForm: Render (fetches boards/lists/tasks)
    QuickActions-->>User: Show quick action items (collapsible)
    BoardNavigation-->>User: Show boards (collapsible, fetch state)
    AddTaskForm-->>User: Show add task form (fetch state)
    ErrorBoundary-->>User: On error, show error UI with retry/reload
    User->>ErrorBoundary: Retry or reload if error occurs
Loading

Suggested reviewers

  • vhpx

Poem

In the warren of code, new tunnels appear,
With collapsible menus and errors made clear.
Boards fetch themselves, and tasks know their place,
QuickActions now fold with elegant grace.
If trouble should hop in, an error guard’s near—
This palette’s more clever, more bunny, more dear!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 813564e and 6345861.

📒 Files selected for processing (1)
  • apps/web/src/components/command/add-task-form.tsx (11 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/src/components/command/add-task-form.tsx
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Deploy-Preview
  • GitHub Check: Deploy-Preview
  • GitHub Check: Deploy-Preview
  • GitHub Check: Deploy-Preview
  • GitHub Check: Verify generated types
  • GitHub Check: Deploy-Preview
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in Comment
  • Commit Unit Tests in branch feat/command-palette/improve-quick-assist

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Jun 24, 2025

Codecov Report

Attention: Patch coverage is 0% with 665 lines in your changes missing coverage. Please review.

Project coverage is 0.86%. Comparing base (fb52eac) to head (6345861).
Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
...ps/web/src/components/command/board-navigation.tsx 0.00% 190 Missing ⚠️
apps/web/src/components/command/quick-actions.tsx 0.00% 132 Missing ⚠️
apps/web/src/components/command/add-task-form.tsx 0.00% 127 Missing ⚠️
apps/web/src/components/command/index.tsx 0.00% 104 Missing ⚠️
apps/web/src/components/command/coming-soon.tsx 0.00% 53 Missing ⚠️
apps/web/src/components/command/command-root.tsx 0.00% 49 Missing ⚠️
[...]/tasks/boards/[boardId]/_components/list-view.tsx](https://app.codecov.io/gh/tutur3u/platform/pull/3174?src=pr&el=tree&filepath=apps%2Fweb%2Fsrc%2Fapp%2F%5Blocale%5D%2F%28dashboard%29%2F%5BwsId%5D%2Ftasks%2Fboards%2F%5BboardId%5D%2F_components%2Flist-view.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tutur3u#diff-YXBwcy93ZWIvc3JjL2FwcC9bbG9jYWxlXS8oZGFzaGJvYXJkKS9bd3NJZF0vdGFza3MvYm9hcmRzL1tib2FyZElkXS9fY29tcG9uZW50cy9saXN0LXZpZXcudHN4) 0.00% 7 Missing ⚠️
apps/web/src/components/command/command-header.tsx 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3174      +/-   ##
==========================================
- Coverage    0.87%    0.86%   -0.01%     
==========================================
  Files        2594     2594              
  Lines      337439   337777     +338     
  Branches     3158     3151       -7     
==========================================
- Hits         2942     2932      -10     
- Misses     332313   332661     +348     
  Partials     2184     2184              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @Adinorio, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request delivers a substantial upgrade to the task management system, focusing on improving the user's ability to navigate, filter, and analyze tasks. It introduces powerful new UI features for task lists and analytics, backed by significant database enhancements for tag management, all while refining the command palette's usability and error handling.

Highlights

  • Enhanced Task List View: The task list view has been significantly upgraded with advanced filtering capabilities (by priority, status, assignee, and date), multi-column sorting, pagination, and options to toggle column visibility. It also introduces bulk task selection for future actions.
  • New Task Analytics & Visualization: Several new components have been added to provide deeper insights into tasks, including a comprehensive Gantt chart timeline, detailed status distribution, task creation and flow analytics, and workflow efficiency metrics.
  • Improved Command Palette User Experience: The command palette now offers a more robust user experience with explicit loading indicators, detailed error messages, and user-friendly empty states. It includes retry mechanisms for data fetching and direct prompts to create new boards or lists when applicable.
  • Database Performance & Integrity for Tags: The backend has been strengthened with new PostgreSQL GIN indexes for faster JSONB tag queries on board tags. Atomic operations for adding and removing tags, along with a new database-level CHECK constraint, ensure data integrity and improve concurrency.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This is an impressive pull request that significantly enhances the application's task management capabilities. The new list view with advanced filtering, sorting, and bulk actions is a huge improvement to the user experience. The addition of the Gantt chart and analytics components provides valuable insights for users.

On the backend, the SQL migration for board tags is well-executed, focusing on performance and atomicity. The command palette is now much more robust, with better loading/error states and an error boundary.

The code quality is high, with good separation of concerns and use of modern React patterns. I've left a few suggestions for minor improvements, mostly around performance, robustness, and navigation consistency. Great work!

Copy link
Contributor

github-actions bot commented Jun 25, 2025

🚨 Biome Check Report

Issues Found: 2774

📊 Analysis Summary

Metric Value Status
📁 Files Checked 2753 ✅ Complete
⚠️ Total Issues 2774 🚧 Needs attention

🔍 Issue Breakdown

Issue Type Count Status
Errors 1312 🔴 Needs fixing
⚠️ Warnings 1330 🟡 Consider fixing
📝 Total Issues 2642 📊 See details above

🛠️ Next Steps

Run the following command to fix issues:

bun format-and-lint:fix

Then commit and push the changes.


🤖 Auto-generated by Biome Check workflow • Last updated: 6/25/2025, 4:31:04 AM

@Adinorio Adinorio marked this pull request as ready for review June 25, 2025 03:55
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🔭 Outside diff range comments (1)
apps/web/src/components/command/add-task-form.tsx (1)

58-482: Consider adding test coverage for error scenarios.

Static analysis indicates that most of the error handling and edge case code paths are not covered by tests. Given the critical nature of task creation, comprehensive test coverage would help ensure reliability.

Would you like me to help generate unit tests for the error handling scenarios, loading states, and validation logic?

♻️ Duplicate comments (2)
apps/web/src/components/command/add-task-form.tsx (1)

220-220: Use client-side navigation instead of full page reload.

Using window.location.href causes a jarring full page reload. Consider using Next.js router for smoother navigation.

+import { useRouter } from 'next/navigation';

 export function AddTaskForm({
   // ... existing props
 }) {
+  const router = useRouter();
   // ... existing code

   // In the retry button (line 220):
-  onClick={() => window.location.reload()}
+  onClick={() => refetch()}

   // In the create board button (line 248-249):
-  onClick={() => {
-    const wsId = window.location.pathname.split('/')[1];
-    window.location.href = `/${wsId}/tasks/boards`;
-  }}
+  onClick={() => {
+    router.push(`/${wsId}/tasks/boards`);
+    setOpen(false);
+  }}

Also applies to: 248-249

apps/web/src/components/command/board-navigation.tsx (1)

60-64: Use client-side navigation instead of full page reload.

Both navigation actions use window.location.href which causes a full page reload. This was previously flagged - consider implementing client-side navigation.

+import { useRouter } from 'next/navigation';

 export function BoardNavigation({ wsId, setOpen }: BoardNavigationProps) {
+  const router = useRouter();
   // ... existing code

   const handleBoardSelect = (boardId: string) => {
-    // Navigate to the board
-    window.location.href = `/${wsId}/tasks/boards/${boardId}`;
-    setOpen(false);
+    router.push(`/${wsId}/tasks/boards/${boardId}`);
+    setOpen(false);
   };

   // In the create board button (line 150):
-  onClick={() => {
-    window.location.href = `/${wsId}/tasks/boards`;
-    setOpen(false);
-  }}
+  onClick={() => {
+    router.push(`/${wsId}/tasks/boards`);
+    setOpen(false);
+  }}

Also applies to: 150-151

🧹 Nitpick comments (1)
apps/web/src/components/command/quick-actions.tsx (1)

45-65: Consider using Next.js router for navigation

The navigation handlers use window.location.href which causes full page reloads. In a Next.js application, using the router would provide better performance and user experience.

Consider importing and using Next.js router:

+import { useRouter } from 'next/navigation';

export function QuickActions({
  wsId,
  setOpen,
}: QuickActionsProps) {
+  const router = useRouter();
   const [isExpanded, setIsExpanded] = useState(true);

   const handleAddTask = () => {
-    window.location.href = `/${wsId}/tasks/boards`;
+    router.push(`/${wsId}/tasks/boards`);
     setOpen(false);
   };

   const handleTimeTracker = () => {
-    window.location.href = `/${wsId}/time-tracker`;
+    router.push(`/${wsId}/time-tracker`);
     setOpen(false);
   };

   const handleCalendar = () => {
-    window.location.href = `/${wsId}/calendar`;
+    router.push(`/${wsId}/calendar`);
     setOpen(false);
   };
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fb52eac and e54a218.

📒 Files selected for processing (7)
  • apps/web/src/components/command/add-task-form.tsx (10 hunks)
  • apps/web/src/components/command/board-navigation.tsx (2 hunks)
  • apps/web/src/components/command/coming-soon.tsx (1 hunks)
  • apps/web/src/components/command/command-header.tsx (1 hunks)
  • apps/web/src/components/command/command-root.tsx (1 hunks)
  • apps/web/src/components/command/index.tsx (3 hunks)
  • apps/web/src/components/command/quick-actions.tsx (3 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
apps/web/src/components/command/board-navigation.tsx (2)
apps/web/src/components/command/types.ts (1)
  • Board (1-5)
packages/ui/src/components/ui/command.tsx (2)
  • CommandGroup (172-172)
  • CommandItem (174-174)
apps/web/src/components/command/quick-actions.tsx (2)
packages/ui/src/components/ui/command.tsx (2)
  • CommandGroup (172-172)
  • CommandItem (174-174)
packages/ui/src/components/ui/calendar.tsx (1)
  • Calendar (211-211)
🪛 GitHub Check: codecov/patch
apps/web/src/components/command/board-navigation.tsx

[warning] 4-8: apps/web/src/components/command/board-navigation.tsx#L4-L8
Added lines #L4 - L8 were not covered by tests


[warning] 20-20: apps/web/src/components/command/board-navigation.tsx#L20
Added line #L20 was not covered by tests

apps/web/src/components/command/add-task-form.tsx

[warning] 58-62: apps/web/src/components/command/add-task-form.tsx#L58-L62
Added lines #L58 - L62 were not covered by tests


[warning] 73-74: apps/web/src/components/command/add-task-form.tsx#L73-L74
Added lines #L73 - L74 were not covered by tests


[warning] 80-84: apps/web/src/components/command/add-task-form.tsx#L80-L84
Added lines #L80 - L84 were not covered by tests


[warning] 89-89: apps/web/src/components/command/add-task-form.tsx#L89
Added line #L89 was not covered by tests


[warning] 102-103: apps/web/src/components/command/add-task-form.tsx#L102-L103
Added lines #L102 - L103 were not covered by tests


[warning] 204-221: apps/web/src/components/command/add-task-form.tsx#L204-L221
Added lines #L204 - L221 were not covered by tests


[warning] 223-224: apps/web/src/components/command/add-task-form.tsx#L223-L224
Added lines #L223 - L224 were not covered by tests


[warning] 226-228: apps/web/src/components/command/add-task-form.tsx#L226-L228
Added lines #L226 - L228 were not covered by tests


[warning] 230-230: apps/web/src/components/command/add-task-form.tsx#L230
Added line #L230 was not covered by tests


[warning] 244-250: apps/web/src/components/command/add-task-form.tsx#L244-L250
Added lines #L244 - L250 were not covered by tests


[warning] 252-252: apps/web/src/components/command/add-task-form.tsx#L252
Added line #L252 was not covered by tests


[warning] 254-254: apps/web/src/components/command/add-task-form.tsx#L254
Added line #L254 was not covered by tests


[warning] 300-306: apps/web/src/components/command/add-task-form.tsx#L300-L306
Added lines #L300 - L306 were not covered by tests


[warning] 308-309: apps/web/src/components/command/add-task-form.tsx#L308-L309
Added lines #L308 - L309 were not covered by tests


[warning] 311-316: apps/web/src/components/command/add-task-form.tsx#L311-L316
Added lines #L311 - L316 were not covered by tests


[warning] 318-331: apps/web/src/components/command/add-task-form.tsx#L318-L331
Added lines #L318 - L331 were not covered by tests


[warning] 346-347: apps/web/src/components/command/add-task-form.tsx#L346-L347
Added lines #L346 - L347 were not covered by tests


[warning] 354-356: apps/web/src/components/command/add-task-form.tsx#L354-L356
Added lines #L354 - L356 were not covered by tests


[warning] 358-364: apps/web/src/components/command/add-task-form.tsx#L358-L364
Added lines #L358 - L364 were not covered by tests


[warning] 366-369: apps/web/src/components/command/add-task-form.tsx#L366-L369
Added lines #L366 - L369 were not covered by tests


[warning] 414-414: apps/web/src/components/command/add-task-form.tsx#L414
Added line #L414 was not covered by tests


[warning] 416-416: apps/web/src/components/command/add-task-form.tsx#L416
Added line #L416 was not covered by tests


[warning] 432-433: apps/web/src/components/command/add-task-form.tsx#L432-L433
Added lines #L432 - L433 were not covered by tests


[warning] 452-457: apps/web/src/components/command/add-task-form.tsx#L452-L457
Added lines #L452 - L457 were not covered by tests


[warning] 459-463: apps/web/src/components/command/add-task-form.tsx#L459-L463
Added lines #L459 - L463 were not covered by tests


[warning] 465-472: apps/web/src/components/command/add-task-form.tsx#L465-L472
Added lines #L465 - L472 were not covered by tests


[warning] 474-480: apps/web/src/components/command/add-task-form.tsx#L474-L480
Added lines #L474 - L480 were not covered by tests


[warning] 482-482: apps/web/src/components/command/add-task-form.tsx#L482
Added line #L482 was not covered by tests

🔇 Additional comments (16)
apps/web/src/components/command/command-header.tsx (1)

64-66: LGTM!

The callback style change is functionally equivalent and aligns with the explicit callback pattern used elsewhere in the codebase.

apps/web/src/components/command/coming-soon.tsx (1)

9-76: Well-implemented collapsible UI pattern!

The refactoring successfully introduces a collapsible interface that's consistent with the broader command palette UI improvements. The default collapsed state for "Coming Soon" features is a good UX choice.

apps/web/src/components/command/command-root.tsx (1)

20-40: Keyboard shortcuts implementation looks good!

The implementation correctly handles Cmd/Ctrl+1 and Cmd/Ctrl+2 to toggle sections, with proper event cleanup.

apps/web/src/components/command/add-task-form.tsx (2)

58-230: Excellent error handling implementation!

The comprehensive error handling with retry logic, loading states, and user-friendly error messages significantly improves the user experience. The distinction between different error scenarios (loading failure, no boards, no lists) is particularly well done.


452-482: Clear and helpful validation messages!

The validation feedback provides excellent guidance to users with appropriate icons and contextual messages for each scenario.

apps/web/src/components/command/board-navigation.tsx (1)

28-161: Excellent implementation of self-contained data fetching!

The component successfully manages its own data fetching with comprehensive error handling, retry logic, and clear UI states. The collapsible interface and limitation to 10 boards with an informative message are thoughtful UX improvements.

apps/web/src/components/command/quick-actions.tsx (5)

7-14: Good addition of collapsible UI components

The imports for chevron icons and Button component support the new collapsible functionality well.


23-26: Excellent refactoring of props interface

The simplified props interface with wsId and setOpen aligns perfectly with the decentralized architecture approach mentioned in the PR objectives.


32-32: Good default state for user experience

Defaulting the collapsible section to expanded provides better initial user experience by showing available actions immediately.


68-90: Excellent implementation of collapsible header

The collapsible header with action count badge and toggle button provides great user feedback and control. The styling and interaction patterns are well implemented.


93-215: Well-structured collapsible content with good visual design

The conditional rendering based on isExpanded state and the comprehensive styling for each action item create an excellent user experience. The hover effects, gradients, and responsive design elements are well-implemented.

apps/web/src/components/command/index.tsx (5)

8-12: Good imports for error boundary functionality

The new imports for Button, icons, and React support the comprehensive error boundary implementation.


26-38: Excellent error boundary reset mechanism

The key-based reset approach combined with comprehensive state cleanup provides a robust way to recover from errors while ensuring the component starts fresh.


40-41: Good architectural decision documented

The comment clearly explains the shift from centralized to decentralized data fetching, which aligns with the PR objective to improve navigation and component modularity.


125-172: Excellent error boundary integration

The error boundary wrapping the main UI components provides robust error isolation while maintaining the existing component structure and functionality.


177-247: Outstanding error boundary implementation

This error boundary implementation follows React best practices with:

  • Proper error catching and logging
  • User-friendly error UI with clear messaging
  • Development-mode error details for debugging
  • Multiple recovery options (retry and reload)
  • Clean state management

The visual design with icons and spacing provides excellent user experience during error scenarios.

- Fix SQL migration exception handling to catch correct error type (raise_exception instead of SQLSTATE '22000')
- Move priorityLabels constant outside component render to improve performance
- Replace window.location.href with router.push() for client-side navigation in:
  - add-task-form.tsx
  - board-navigation.tsx
  - quick-actions.tsx
- Add useRouter imports where needed for proper Next.js navigation
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (4)
apps/web/src/app/[locale]/(dashboard)/[wsId]/tasks/boards/[boardId]/_components/list-view.tsx (1)

106-112: LGTM! Performance optimization successfully implemented.

This change addresses the previous review feedback perfectly by moving the priorityLabels object outside the component. This prevents unnecessary re-creation on every render and improves performance, especially as the priority list could grow.

The constant is properly defined and maintains the correct mapping structure.

apps/db/supabase/migrations/20250623130150_improve_board_tags_performance_and_atomicity.sql (1)

70-70: Good fix addressing the previous review feedback.

The change from WHEN SQLSTATE '22000' to WHEN raise_exception correctly addresses the past review comment. This ensures that the exception handler catches the default RAISE EXCEPTION errors (P0001) thrown by the validate_and_normalize_board_tags function, rather than trying to catch data_exception errors (22000) that aren't being raised.

apps/web/src/components/command/add-task-form.tsx (2)

91-91: Correct fix for query return type consistency.

Returning { tasks: [] } instead of [] maintains consistency with the expected return type structure, preventing potential runtime errors when accessing .tasks property.


246-257: Good navigation improvement addressing previous feedback.

The use of router.push() instead of window.location.href provides smooth client-side navigation and properly closes the command palette. This addresses the previous review feedback effectively.

🧹 Nitpick comments (3)
apps/web/src/app/[locale]/(dashboard)/[wsId]/tasks/boards/[boardId]/_components/list-view.tsx (1)

1209-1210: Consider implementing the bulk operations.

There are TODO comments for bulk edit and delete functionality. These features would enhance the user experience for managing multiple tasks simultaneously.

Would you like me to help implement the bulk edit and delete operations, or should I open a new issue to track these tasks?

Also applies to: 1219-1220

apps/web/src/components/command/board-navigation.tsx (1)

210-250: Optimize board list rendering and consider virtualization.

The current implementation shows only the first 10 boards (slice(0, 10)), which is good for performance. However, consider implementing virtualization for workspaces with many boards to improve performance further.

The current approach is acceptable, but for better scalability:

-              {boards.slice(0, 10).map((board: Board) => (
+              {boards.map((board: Board) => (

And implement a virtual scrolling solution like react-window or react-virtualized if performance becomes an issue with large board lists.

apps/web/src/components/command/add-task-form.tsx (1)

206-232: Comprehensive error handling with user-friendly interface.

The error state implementation provides:

  • Clear visual feedback with error icons
  • Detailed error messaging
  • Retry functionality via page reload
  • Option to close the form

However, consider using query refetch instead of window.location.reload() for better UX:

-            onClick={() => window.location.reload()}
+            onClick={() => window.location.reload()}

Actually, you might want to implement a refetch mechanism similar to the BoardNavigation component for consistency.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e54a218 and 813564e.

📒 Files selected for processing (5)
  • apps/db/supabase/migrations/20250623130150_improve_board_tags_performance_and_atomicity.sql (1 hunks)
  • apps/web/src/app/[locale]/(dashboard)/[wsId]/tasks/boards/[boardId]/_components/list-view.tsx (1 hunks)
  • apps/web/src/components/command/add-task-form.tsx (11 hunks)
  • apps/web/src/components/command/board-navigation.tsx (2 hunks)
  • apps/web/src/components/command/quick-actions.tsx (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/src/components/command/quick-actions.tsx
🧰 Additional context used
🧬 Code Graph Analysis (2)
apps/web/src/components/command/board-navigation.tsx (2)
apps/web/src/components/command/types.ts (1)
  • Board (1-5)
packages/ui/src/components/ui/command.tsx (2)
  • CommandGroup (172-172)
  • CommandItem (174-174)
apps/web/src/components/command/add-task-form.tsx (1)
packages/ui/src/components/ui/select.tsx (5)
  • Select (170-170)
  • SelectTrigger (178-178)
  • SelectValue (179-179)
  • SelectContent (171-171)
  • SelectItem (173-173)
🪛 GitHub Check: codecov/patch
apps/web/src/app/[locale]/(dashboard)/[wsId]/tasks/boards/[boardId]/_components/list-view.tsx

[warning] 106-112: apps/web/src/app/[locale]/(dashboard)/[wsId]/tasks/boards/[boardId]/_components/list-view.tsx#L106-L112
Added lines #L106 - L112 were not covered by tests

apps/web/src/components/command/add-task-form.tsx

[warning] 27-27: apps/web/src/components/command/add-task-form.tsx#L27
Added line #L27 was not covered by tests


[warning] 57-57: apps/web/src/components/command/add-task-form.tsx#L57
Added line #L57 was not covered by tests


[warning] 60-64: apps/web/src/components/command/add-task-form.tsx#L60-L64
Added lines #L60 - L64 were not covered by tests


[warning] 75-76: apps/web/src/components/command/add-task-form.tsx#L75-L76
Added lines #L75 - L76 were not covered by tests


[warning] 82-86: apps/web/src/components/command/add-task-form.tsx#L82-L86
Added lines #L82 - L86 were not covered by tests


[warning] 91-91: apps/web/src/components/command/add-task-form.tsx#L91
Added line #L91 was not covered by tests


[warning] 104-105: apps/web/src/components/command/add-task-form.tsx#L104-L105
Added lines #L104 - L105 were not covered by tests


[warning] 206-223: apps/web/src/components/command/add-task-form.tsx#L206-L223
Added lines #L206 - L223 were not covered by tests


[warning] 225-226: apps/web/src/components/command/add-task-form.tsx#L225-L226
Added lines #L225 - L226 were not covered by tests


[warning] 228-230: apps/web/src/components/command/add-task-form.tsx#L228-L230
Added lines #L228 - L230 were not covered by tests


[warning] 232-232: apps/web/src/components/command/add-task-form.tsx#L232
Added line #L232 was not covered by tests


[warning] 246-252: apps/web/src/components/command/add-task-form.tsx#L246-L252
Added lines #L246 - L252 were not covered by tests


[warning] 254-254: apps/web/src/components/command/add-task-form.tsx#L254
Added line #L254 was not covered by tests


[warning] 256-256: apps/web/src/components/command/add-task-form.tsx#L256
Added line #L256 was not covered by tests


[warning] 302-308: apps/web/src/components/command/add-task-form.tsx#L302-L308
Added lines #L302 - L308 were not covered by tests


[warning] 310-311: apps/web/src/components/command/add-task-form.tsx#L310-L311
Added lines #L310 - L311 were not covered by tests


[warning] 313-318: apps/web/src/components/command/add-task-form.tsx#L313-L318
Added lines #L313 - L318 were not covered by tests


[warning] 320-333: apps/web/src/components/command/add-task-form.tsx#L320-L333
Added lines #L320 - L333 were not covered by tests


[warning] 348-349: apps/web/src/components/command/add-task-form.tsx#L348-L349
Added lines #L348 - L349 were not covered by tests


[warning] 356-358: apps/web/src/components/command/add-task-form.tsx#L356-L358
Added lines #L356 - L358 were not covered by tests


[warning] 360-366: apps/web/src/components/command/add-task-form.tsx#L360-L366
Added lines #L360 - L366 were not covered by tests


[warning] 368-371: apps/web/src/components/command/add-task-form.tsx#L368-L371
Added lines #L368 - L371 were not covered by tests


[warning] 416-416: apps/web/src/components/command/add-task-form.tsx#L416
Added line #L416 was not covered by tests


[warning] 418-418: apps/web/src/components/command/add-task-form.tsx#L418
Added line #L418 was not covered by tests


[warning] 434-435: apps/web/src/components/command/add-task-form.tsx#L434-L435
Added lines #L434 - L435 were not covered by tests


[warning] 454-459: apps/web/src/components/command/add-task-form.tsx#L454-L459
Added lines #L454 - L459 were not covered by tests


[warning] 461-465: apps/web/src/components/command/add-task-form.tsx#L461-L465
Added lines #L461 - L465 were not covered by tests


[warning] 467-474: apps/web/src/components/command/add-task-form.tsx#L467-L474
Added lines #L467 - L474 were not covered by tests


[warning] 476-482: apps/web/src/components/command/add-task-form.tsx#L476-L482
Added lines #L476 - L482 were not covered by tests

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Deploy-Preview
  • GitHub Check: Deploy-Preview
  • GitHub Check: Deploy-Preview
  • GitHub Check: Deploy-Preview
  • GitHub Check: Deploy-Preview
  • GitHub Check: Verify generated types
🔇 Additional comments (12)
apps/web/src/components/command/board-navigation.tsx (5)

32-48: Excellent data fetching implementation with robust error handling.

The useQuery implementation is well-structured with appropriate retry logic and error handling. The retry configuration (2 attempts with 1000ms delay) provides good user experience without being overly aggressive.


67-71: Good client-side navigation implementation.

Using router.push() for navigation is the correct approach for Next.js applications, providing smooth client-side transitions without full page reloads. The component properly closes the command palette after navigation.


74-95: Comprehensive loading state with good UX.

The loading state provides clear visual feedback with both header and content loading indicators. The consistent use of the Loader component with appropriate styling enhances the user experience.


98-135: Excellent error handling with user-friendly retry mechanism.

The error state implementation is comprehensive, providing:

  • Clear error messaging with visual indicators
  • Detailed error information from the caught exception
  • Accessible retry functionality
  • Consistent styling with the loading state

138-176: Well-designed empty state with clear call-to-action.

The empty state effectively guides users with:

  • Clear messaging about the lack of boards
  • Helpful instructions for next steps
  • Accessible button to create the first board
  • Consistent visual design patterns
apps/web/src/components/command/add-task-form.tsx (7)

27-27: Good addition of useRouter for proper navigation.

Adding useRouter enables client-side navigation, which is the correct approach for Next.js applications instead of using window.location.href.


60-77: Excellent error handling enhancement for boards query.

The addition of boardsError and retry configuration (lines 75-76) significantly improves the robustness of the component. The retry logic provides good user experience during temporary network issues.


82-106: Good improvement to tasks query error handling.

The enhanced error handling for tasks loading and the retry configuration improve component reliability.


302-334: Excellent UX improvement for boards without lists.

The conditional rendering provides clear feedback when a board has no lists, with appropriate warning styling and helpful instructions. The fallback to the select dropdown when lists are available maintains the expected workflow.


348-372: Good error handling for tasks loading.

The addition of error state handling for tasks provides consistent error feedback throughout the component. The visual indicators and error messages help users understand what went wrong.


434-435: Smart button disable logic for empty lists.

The additional disable condition (Boolean(selectedBoardId) && availableLists.length === 0) prevents task creation when the selected board has no lists, which is the correct behavior.


453-484: Comprehensive validation messaging enhances UX.

The validation messages provide clear, contextual feedback for different validation states:

  • Missing task name
  • Missing board selection
  • Missing list selection
  • Board with no lists

The use of consistent icons and styling creates a cohesive user experience.

- Add refetch function to boards query in add-task-form
- Replace window.location.reload() with refetchBoards() in error handling
- Provides better user experience without full page reload
@Adinorio Adinorio marked this pull request as draft June 25, 2025 04:42
Copy link
Member

@vhpx vhpx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @Adinorio.

@vhpx vhpx marked this pull request as ready for review June 25, 2025 05:38
@vhpx vhpx merged commit 6034afc into main Jun 25, 2025
19 checks passed
@vhpx vhpx deleted the feat/command-palette/improve-quick-assist branch June 25, 2025 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants